function gotoVirtual(){
    window.location.href='/virtual';
}

function gotoPhone(){
    window.location.href='/phone';
}

function gotoPhoneImport(){
    window.location.href='/phoneImport';
}

function gotoVirtualImport(){
    window.location.href='/upload';
}
function gotoIdentityConfig(){
    window.location.href='/identityConfig';
}

function gotoGpsConfig(){
    window.location.href='/gpsConfig';
}

/**
 * 字符串为空转换成 ""
 * @param  字符串
 * @returns 
 */
function noNull(object){
    if(!object || object == 'null' || object == 'undefined')
        return '';
    else
        return object;
}

/*
 * 时间插件数据转换
 */
function timeFormat(value){
  if(value == null) {
    return "";  
  }
  value = value.split("T").join(" ");
  return value;
}



/*--------------------------------------------------AjaxUtil---------------------------------------------*/
var AjaxUtil={
/*
   requestUrl:请求url
   dataType:返回数据类型
   success: 成功后的参数
   async默认的设置值为true，这种情况为异步方式
 */
ajaxRequest:function(requestUrl,dataType,success,async){
    var paras="",urlTemp="";
    var urlIndex=requestUrl.indexOf("?");

    if(urlIndex>-1){
        urlTemp=requestUrl.substring(0,urlIndex);
        paras= requestUrl.substring(urlIndex+1);
        requestUrl=urlTemp;
    }

    $.ajax({
        type: "post",
        data: paras,
        url: requestUrl,
        dataType: dataType,
        success: success,
        async: async,
        error: function (XmlHttpRequest,textStatus, errorThrown) {
            //alert(XmlHttpRequest.responseText);
        }
    });
},

/*
    requestUrl:请求url
    data:请求数据(json)
    success: 成功后的参数
    async默认的设置值为true，这种情况为异步方式
*/
ajaxRequestJson:function(requestUrl,data,success,async){
    $.ajax({
        type: "post",
        data: data,
        url: requestUrl,
        dataType: "json",
        success: success,
        async: async,
        error: function (XmlHttpRequest,textStatus, errorThrown) {
            //alert(XmlHttpRequest.responseText);
            }
        });
    }
};